package cate.game.role.pvp.guildwar.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBGuildWar;
import cate.game.pvp.guildwar.data.msg.GWRoleRankInnerResp;

@ClientMsg(title = "公会战 玩家排行榜 の 请求")
public class GuildWarRoleRankReq implements MsgInput {

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GWRoleRankInnerResp resp = game.pvp.guildWar.getMessagingModule().getRoleRank(cc.getRole().getUid());
        cc.getRole().sendNow(new GuildWarRoleRankResp(resp.list,resp.myRank,resp.my));
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBGuildWar.ROLE_RANK_REQ;
    }
}
